-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: 4106 nnnnat catalogItem GQL query #4200
Conversation
…at-gql-catalog-product
…alog.gql with catalogItemProduct comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See one little comment and delete the yarn.lock
file since this repo does not use yarn
@@ -391,4 +391,9 @@ extend type Query { | |||
"By default, items are sorted by when they were created, newest first. Set this to sort by one of the other allowed fields" | |||
sortBy: CatalogItemSortByField = createdAt | |||
): CatalogItemConnection | |||
"Gets product from catalog" | |||
catalogItemProduct( | |||
"Provide either a product id or slug" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
id
-> ID
since this is end-user documentation
@aldeed I've removed the |
Resolves #4106
Impact: minor
Type: feature
Issue
Summary
Create a query to retrieve a single catalog product by the provided slug or ID.
Implementation
The catalogProduct query should have the following signature
See #4105 for schema detail.
Acceptance Criteria
Using GraphQL, I can use the catalogProduct(slugOrId: String): CatalogItemProduct query to get a single CatalogProduct by it's slug.
Solution
Breaking changes
N/A
Testing
catalogItemProduct(slugOrId: "example-product") { _id }
and copy the returned IDcatalogItemProduct(slugOrId: "opaqueID") { _id product { slug } }